package com.qf.oop.fengzhuang;

public class Demo01 {
    public static void main(String[] args) {
        Student stu01 = new Student();
//        stu01.age=-100;
//        System.out.println(stu01.age);

        System.out.println(stu01.getAge());
        stu01.setAge(-100);
        System.out.println(stu01.getAge());

        // 使用构造方法
        Student stu02 = new Student(-100);
        System.out.println(stu02.getAge());
    }
}
